package graphs;

import java.util.List;

/**
 * @param <T>
 * @file GraphADT.java
 * @author Juan Humanes Ferrer
 * @date 04-Marzo-2014
 */
public interface GraphADT<T> {

    /**
     * Adds a vertex to this graph, associating object with vertex.
     *
     * @param vertex
     */
    public void addVertex(T vertex);

    /**
     * Removes a single vertex with the given value from this graph.
     *
     * @param vertex
     */
    public void removeVertex(T vertex);

    /**
     * Inserts an edge between two vertices of this graph.
     *
     * @param vertex1
     * @param vertex2
     */
    public void addEdge(T vertex1, T vertex2);

    public void add2Edge(int vertex1, int vertex2);

    /**
     * Removes an edge between two vertices of this graph.
     *
     * @param vertex1
     * @param vertex2
     */
    public void removeEdge(T vertex1, T vertex2);

    /**
     * Returns true if this graph is empty, false otherwise.
     *
     * @return
     */
    public boolean isEmpty();

    public int existeVertice(String gen);

    /**
     * Returns the number of vertices in this graph.
     *
     * @return
     */
    public int size();

    /**
     * Retorna la matriz de adyacencia
     *
     * @return
     */
    public boolean[][] getAdjMatrix();

    /**
     * Retorna el numero de vertices
     *
     * @return
     */
    public int getNumVertices();

    /**
     * ****************************************************************
     * Returns a copy of the vertices array.
     * **************************************************************** @return
     */
    public List<T> getVertices();

    /**
     * Asigna el vector de vertices de entrada al del objeto
     *
     * @param vertices
     */
    public void setVertices(T[] vertices);

    /**
     * Asigna la matriz de aristas de entrada al del objeto
     *
     * @param adjMatrix
     */
    public void setAMtrix(boolean[][] adjMatrix);

    /**
     * Devuelve el numero de vertices
     *
     * @param numVertices
     */
    public void setNumVertices(int numVertices);

}
